import os
import glob
import pandas as pd

path = 'output/人口普查数据-csv/'
os.chdir(path)
extension = 'csv'
all_filenames = [i for i in glob.glob('*.{}'.format(extension))]
combined_csv = pd.concat([pd.read_csv(f) for f in all_filenames])
combined_csv.to_csv('../人口普查数据-合并.csv', index=False, encoding='utf-8')
